class ExerciseRating < ActiveRecord::Base
  belongs_to :user
  belongs_to :lecture

  validates :rating,  :presence => true

  validates_numericality_of :difficulty, :only_integer => true, :message => "can only be whole number."
  validates_inclusion_of :difficulty, :in => 1..5, :message => "can only be between 1 and 5."

  validates_numericality_of :work_load, :only_integer => true, :message => "can only be whole number."
  validates_inclusion_of :work_load, :in => 1..5, :message => "can only be between 1 and 5."

  attr_accessible :rating, :difficulty, :work_load, :id, :lecture_id, :user_id, :comment
end
